package main

/**
高可用的配置 服务的发现注册 分布式锁 master选举
*/
import (
	"fmt"
	etcd_client "github.com/coreos/etcd/clientv3"
	"time"
)

func main() {
	cli, err := etcd_client.new(etcd_client.config{
		Endpoints:   []string{"localhost:2379", "localhost:8888", "localhost:7777"},
		DialTimeout: 5 * time.Second,
	})

	if err != nil {
		fmt.Println("connect err", err)
		return
	}
	fmt.Println("connect succ")
	defer cli.close()
	//
}
